package com.iyoudoock.citymine.adapter;

import android.content.Context;
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;

import com.iyoudoock.citymine.widget.wheel.WheelAdapter;
import com.iyoudoock.citymine.widget.wheel.adapter.AbstractWheelAdapter;
import com.iyoudoock.citymine.widget.wheel.adapter.AbstractWheelTextAdapter;

import java.util.ArrayList;

/**
 * Created by Kvin on 2017/5/15.
 */
public class RecycleChoiceAdapter extends AbstractWheelTextAdapter {
    private ArrayList<String> choiceItems;

    public RecycleChoiceAdapter(Context context, ArrayList<String> choiceItems) {
        super(context);
        this.choiceItems = choiceItems;
    }


    @Override
    protected CharSequence getItemText(int index) {
        return choiceItems == null ? null : choiceItems.get(index);
    }

    @Override
    public int getItemsCount() {
        return choiceItems == null ? 0 : choiceItems.size();
    }
}
